package com.journey.org.ui.home

import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.lifecycle.Observer
import com.journey.org.BR
import com.journey.org.R
import com.journey.org.databinding.FragmentHomeBinding
import com.mvvmhabit.org.base.BaseLazyFragment
import com.mvvmhabit.org.custom.DividerItemDecoration

/**
 * @Date: 2020/11/17 14:14
 * @Author:小妖
 * @Description: 首页
 */
class HomeFragment : BaseLazyFragment<FragmentHomeBinding, HomeViewModel>() {

    override fun initVariableId(): Int = BR.viewModel

    override fun initViewModel(): Class<HomeViewModel> = HomeViewModel::class.java

    override fun initContentView(
        inflater: LayoutInflater?,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): Int = R.layout.fragment_home

    override fun initData() {
        super.initData()
        mBinding.layoutViewPager.addBannerLifecycleObserver(this)
        // 请求 banner 数据
        mViewModel?.loadBannerData()
    }

    override fun lazyLoadData() {
    }


}